package com.hs.srm.admin.modules.sys.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.hs.srm.common.utils.R;

/**
 * @description: 首页Controller
 * @author: Wangpeidong
 * @create: 2018-04-24 10:39
 */
@Controller
public class HomeController extends AbstractController {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8424291172424324396L;

	/**
	 * 获取首页数据
	 * @return
	 */
	@RequestMapping("/home")
	@ResponseBody
	public R home() {
		return R.ok();
	}

	@RequestMapping("/home/manage/list")
	@ResponseBody
	public R homeManageList() {
		Map<String, Object> map = new HashMap<>(1);
		return R.ok().put("result", map);
	}

	/**
	 * 跳转至首页
	 * @return
	 */
	@RequestMapping("/toHome")
	public ModelAndView toHome() {
		return new ModelAndView("modules/home");
	}
}
